import request from '../utils/request'

export function getById(id) {
  return request.get(`/users/${id}`)
}

// 查询
export function getList(params) {
  return request.get(`/users`,{params:params})
}

//删除
export function DelId(id){
  return request.delete(`/users/${id}`)
} 

//添加
export function addUser(data){
  return request.post('/users',data)
}

//修改
export function modUser(id,data){
  return request.put(`/users/${id}`,data)
}

//用户登录
export function login(data){
  return request.post('/users/token',data)
}